package com.cs.contract.service.impl;

import com.cs.contract.service.CsContractService;
import com.cs.contract.domain.CsContract;
import com.cs.contract.domain.CsPubAttachments;
import com.cs.contract.domain.CsTender;
import com.cs.contract.domain.NonTenderProject;
import com.cs.contract.mapper.CsContractMapper;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Author：zrx
 * @Package：com.cs.service.impl
 * @Project：RuoYi-Cloud
 * @name：CsContractServiceImpl
 * @Date：2024/11/18 15:45
 * @Filename：CsContractServiceImpl
 */
@Service
public class CsContractServiceImpl implements CsContractService {

    private final CsContractMapper csContractMapper;

    public CsContractServiceImpl(CsContractMapper csContractMapper) {
        this.csContractMapper = csContractMapper;
    }

    @Override
    public CsContract getCsContractByEid(Integer eid) {
        return csContractMapper.getCsContractByEid(eid);
    }

    @Override
    public List<CsContract> listCsContract(CsContract csContract) {
        return csContractMapper.listCsContract(csContract);
    }

    @Override
    public List<CsContract> listCsContract2(CsContract csContract) {
        return csContractMapper.listCsContract2(csContract);
    }

    @Override
    public CsPubAttachments getCsPubAttachmentsByEid(Integer eid) {
        return csContractMapper.getCsPubAttachmentsByEid(eid);
    }

    @Override
    public Integer updateCsContract(CsContract csContract) {
        csContract.setUpdateTime(DateUtils.getNowDate());
        return csContractMapper.updateCsContract(csContract);
    }

    @Override
    public Integer deleteCsPubAttamentsByEid(Integer eid) {
        return csContractMapper.deleteCsPubAttamentsByEid(eid);
    }

    @Override
    public Integer updateCsPubAttachments(CsPubAttachments csPubAttachments) {
        return csContractMapper.updateCsPubAttachments(csPubAttachments);
    }

    @Override
    public Integer updateHtCancel(Integer eid) {
        return csContractMapper.updateHtCancel(eid);
    }

    @Override
    public Integer updateNonTenderProject(NonTenderProject nonTenderProject) {
        return csContractMapper.updateNonTenderProject(nonTenderProject);
    }

    @Override
    public Integer updateCsTender(CsTender csTender) {
        return csContractMapper.updateCsTender(csTender);
    }

    @Override
    public Integer deleteCsContractByEid(Integer eid) {
        return csContractMapper.deleteCsContractByEid(eid);
    }

    @Override
    public Integer updateoHstatus(CsContract csContract) {
        return csContractMapper.updateoHstatus(csContract);
    }

    @Override
    public Integer insertCsContract(CsContract csContract) {
        csContract.setCreateTime(DateUtils.getNowDate());
        return csContractMapper.insertCsContract(csContract);
    }

    @Override
    public Integer updateCsTenderEid(CsTender csTender) {
        return csContractMapper.updateCsTenderEid(csTender);
    }

    @Override
    public Integer insertCsPubAttachments(CsPubAttachments csPubAttachments) {
        return csContractMapper.insertCsPubAttachments(csPubAttachments);
    }
}
